package com.myStruts.action;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.myStruts.fromBean.BaseBean;
import com.myStruts.fromBean.UserBean;

public class AddAction implements BaseAction {

	@Override
	public String execute(HttpServletRequest request, HttpServletResponse response, BaseBean baseBean,
			Map<String, String> actionForWard) {
		UserBean ub = (UserBean) baseBean;
		String url = "error";
		if (ub != null && !"".equals(ub.getUserName())&& !"".equals(ub.getPassWord())&& !"".equals(ub.getEmial())&& !"".equals(ub.getPhone())) {
			url = "success";
		}
		return actionForWard.get(url);
	}

}
